/**
 * SPDX-License-Identifier: Apache-2.0
 * Copyright (c) Bao Project and Contributors. All rights reserved.
 */

#ifndef ARCH_INSTRUCTIONS_H
#define ARCH_INSTRUCTIONS_H

static inline uint64_t hlvxhu(uintptr_t addr)
{
    uint64_t value;
    __asm__ volatile(".insn r 0x73, 0x4, 0x32, %0, %1, x3\n\t" : "=r"(value) : "r"(addr)
                     : "memory");
    return value;
}

#endif /* ARCH_INSTRUCTIONS_H */
